const { DataTypes } = require('sequelize');
const defineModel = require('@/config/database');
const Model = defineModel('xs_site', {
	code: {
		type: DataTypes.STRING(50),
		comment: '配置字段',
		allowNull: true,
		unique: true
	},
	label: {
		type: DataTypes.STRING(50),
		comment: '配置名称',
		allowNull: true
	},
	value: {
		type: DataTypes.TEXT('long'),
		comment: '配置值',
		allowNull: true
	},
	type: {
		type: DataTypes.INTEGER(2),
		comment: '配置类型',
		allowNull: true,
	},
	sort: {
		type: DataTypes.INTEGER(3),
		comment: '配置排序'
	},
	scope: {
		type: DataTypes.INTEGER(2),
		comment: '配置范围'
	},
	createtime: {
		type: DataTypes.DATE,
		comment: '创建时间'
	},
	updatetime: {
		type: DataTypes.DATE,
		comment: '更新时间'
	}
});
Model.beforeCreate((model, options) => {
	// console.log(model, options);
});
module.exports = Model;